<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8" import="com.java1234.model.animal,java.util.ArrayList"%> 
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>搜索信息</title>
<style type="text/css">
	html{
	height:100%;
	background-image:url("images/all.jpg");
	background-position:center;
	}
	.form{
	width:400px;
	height:300px;
	margin:0 auto;
	margin-top:300px;
	}.submit{
	margin-top:30px;
	width:100px;
	}
</style>
</head>
<body>
	<form class="form"action="/login/findServlet"method="post">
		按ID查找<input type="text" name="ID"/><br>按名字查找<input type="text" name="animalName"/><input type="submit" value="查找">	<a href="managerinter.jsp">点击此处返回操作界面</a>
		<table border="1">
			<tr><th>宠物ID</th><th>宠物名字</th><th>种类</th><th>价格</th><th>特点</th></tr>
			<%
				try{
					ArrayList<animal> animal1 =(ArrayList<animal>)request.getAttribute("aList");
					for(animal animal2:animal1)
					{
						%><tr><th><%=animal2.getId() %></th><th><%=animal2.getAnimalName() %></th><th><%=animal2.getAnimalType() %></th><th><%=animal2.getPrice() %></th><th><%=animal2.getTxt() %></th>
						</tr>
						
					<%
					}
				}catch(Exception e){
					
				}
			%>
				
		</table>
	</form>

</body>
</html>